home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Amiga Collections: Topik
/
Topik - Disk 14 - Useful Commands (19xx)(Topik Public Domain)(PD)[WB].zip
/
Topik - Disk 14 - Useful Commands (19xx)(Topik Public Domain)(PD)[WB].adf
/
image_tools
/
filter.readme
< prev
next >
Wrap
Text File
|
1989-08-07
|
4KB
|
115 lines
FILTER 1.00
JUNE 6, 1987
By Stephen Vermeulen
3635 Utah Dr. N.W.,
Calgary, Alberta,
CANADA, T2N 4A6
Copyright (C) 1987 By Stephen Vermeulen
This version may be freely redistributed
so long as not charge is made for such
distribution.
---------------------------------------------------------------------
0.0 Introduction
Filter is a program that allows you to perform several types of image
processing on your Amiga. Filter reads and writes standard IFF ILBM
type image files, so it is compatible with all your other Amiga
software. There are various things you can use Filter to do, including
smoothing and softening, edge detection, and sharpening of the image.
A good place to look for information on what Filter can be used to do
is the March 1987 BYTE magazine in the Image Processing theme section.
1.0 Running Filter
Filter can only be run from the CLI (this will probably be fixed soon).
There are two ways of invoking it. First just typing:
filter
will result in the copyright notice, short instructions, and the version
number being printed. By typing a command of the following format:
filter input.pic output.pic kernel
Filter will start to process the picture in the file "input.pic" with the
image processing kernel stored in the file named kernel. When the work
has been done the result will be written to the file "output.pic".
Filter takes quite a while to run, anywhere from 2 minutes to 6 minutes
(or more), so you might want to run this in the background.
2.0 Memory Usage
Filter needs to allocate 2 complete picture buffers, so if you have a 512K
machine you might find it difficult to filter HiRes 16 colour pictures.
Filter works REAL NICE on a 2.5Meg Amiga!
3.0 The Kernel File
The kernel file that Filter uses is a simple ascii text file you can
easily cook up with any editor. It has the following format:
nrows ncols normalizer
[ ]
[ kernel matrix ]
[ ]
for example a kernel file to smooth a picture might be:
3 3 16
1 2 1
2 4 2
1 2 1
or a kernel that does a straight copy would be:
1 1 1
1
or a kernel that does vertical edge detection might be:
5 3 1
-1 0 1
-1 0 1
-1 0 1
-1 0 1
-1 0 1
Anyway, all the numbers in the kernel file must be integers (no decimals
are allowed). The individual numbers are defined in the following:
nrows: This number states how many rows the kernel matrix has.
ncols: This number states how many columns the kernel matrix has.
Remember, the greater the number of rows or columns the
slower the process! Also values for nrows and ncols must
always be odd (1, 3, 5,...), but do not have to be equal.
normalizer: This number is used to scale the resulting colour values
for each pixel after the kernel matrix has been applied.
The scaling process is a simple division of the colour
components (r, g, b) by the value of the normalizer. A
good choice for the value of the normalizer is the sum
of all the elements of the kernel matrix. Note: the
normalizer should be greater than 0 always!
kernel This section of the file contains the actual image
matrix: transformation kernel matrix. This is basically a set
weighting factors that are applied to the pixel under
transformation, and those surrounding it to form a
weighted sum of the colour values. The kernel matrix
always has odd dimensions, and the pixel being transformed
is the one in the centre of the matrix.
4.0 Support
Any comments, suggestions, or bug reports you might care to make will be
gratefully received. If you are interested in seeing this program improve
much send a contribution ($10-$20 to me at the address above). My current
policy on improving the program is to release a new version for every 5
contributions I receive, or when I need a new feature!